/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Radio;
import Interface.Radio;
/**
 *
 * @author Jonathan López, 11106
 * @author Luis Valdeavellano, 
 * @author Carlos Álvarez, 11004
 */

public class RadioCarro implements Radio {
    
    private boolean am;
    private boolean on;
    private int volumen;
    private double actualFm;
    private int actualAm;
        
    /**
     * Inicializa el radio
     */
    public RadioCarro() {
        am = false;
        on = false;
        volumen = 5;
        actualFm = 87.7;
        actualAm = 570;
    }

    public int getActualAm() {
        return actualAm;
    }

    public double getActualFm() {
        return actualFm;
    }

    public boolean isAm() {
        return am;
    }

    public boolean isOn() {
        return on;
    }

    public int getVolumen() {
        return volumen;
    }

    public void setActualAm(int frecuencia) {
        actualAm = frecuencia;
    }

    public void setActualFm(double frecuencia) {
        actualFm = frecuencia;
    }

    public void setAm(boolean onOff) {
        am = onOff;
    }

    public void setVolumen(int num) {
        volumen = num;
    }

    @Override
    public void onOff() {
        if (on=false){
            on=true;
        }else if(on=true){
            on=false;
        }
    }

    @Override
    public void cambiarBanda() {
        if (am=false){
            am=true;
        }else if(am=true){
            am=false;
        }
    }

    @Override
    public void cambiarFrecuencia() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void guardarEstacion(int boton) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void seleccionarEstacion(int boton) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}